import request from '@/utils/request'

// 查询商品标签管理列表
export function listGoodsLabel(query) {
  return request({
    url: '/business/goodsLabel/list',
    method: 'get',
    params: query
  })
}

// 查询商品标签管理详细
export function getGoodsLabel(id) {
  return request({
    url: '/business/goodsLabel/' + id,
    method: 'get'
  })
}

// 新增商品标签管理
export function addGoodsLabel(data) {
  return request({
    url: '/business/goodsLabel',
    method: 'post',
    data: data
  })
}

// 修改商品标签管理
export function updateGoodsLabel(data) {
  return request({
    url: '/business/goodsLabel',
    method: 'put',
    data: data
  })
}

// 删除商品标签管理
export function delGoodsLabel(id) {
  return request({
    url: '/business/goodsLabel/' + id,
    method: 'delete'
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/goodsLabel/export',
    method: 'post',
    data: data
  })
}

// 新增或修改商品标签管理
export function saveOrUpdateGoodsLabel(data) {
  return request({
    url: '/business/goodsLabel/saveOrUpdate',
    method: 'post',
    data: data
  })
}
